package backend.search.controller;

import java.util.List;

import com.opensymphony.xwork2.ActionSupport;

import backend.search.manager.UserSearchManager;

import core.profile.model.BasicProfile;

public class UserSearchAction extends ActionSupport {

	private static final long serialVersionUID = 14343L;
	private UserSearchManager searchManager ;
	private String searchById ;
	private String searchByName; 
	private List<BasicProfile> users ;
		
	public UserSearchAction()
	{
		searchManager =  new UserSearchManager();
	}
	public String execute() 
	{
		this.searchById=this.getSearchById();
		this.searchByName=this.getSearchByName();
		this.users = searchManager.getSimpleSearchResult(this.searchById,this.searchByName);
		return SUCCESS ;
	}
	
	public List<BasicProfile> getUsers() {
		return users;
	}
	public String getSearchById() {
		return searchById;
	}
	public void setSearchById(String searchById) {
		this.searchById = searchById;
	}
	public String getSearchByName() {
		return searchByName;
	}
	public void setSearchByName(String searchByName) {
		this.searchByName = searchByName;
	}
	public void setUsers(List<BasicProfile> users) {
		this.users = users;
	}
}
